package com.flycms.module.role.dao;
import java.util.List;
import java.util.Map;

import com.flycms.module.role.model.AdminRole;
import org.apache.ibatis.annotations.Param;


/**
  *@description
  * ->
  *@create_time 2020/2/24 17:56
  *@author huangzt
  */
public interface AdminRoleDao {
	/**
	  * (方法简介)
	  * ->
	  *@param
	  *@return
	  *@create_time 2020/2/25 10:00
	  *@author huangzt
	  */
	int insert(AdminRole record);
	/**
	  * (方法简介)
	  * ->
	  *@param
	  *@return
	  *@create_time 2020/2/25 10:00
	  *@author huangzt
	  */
	List<AdminRole> queryAll();
	/**
	  * (方法简介)
	  * ->
	  *@param id
	  *@return
	  *@create_time 2020/2/25 10:00
	  *@author huangzt
	  */
	int delete(@Param(value = "id") String id);
	/**
	  * (方法简介)
	  * ->
	  *@param id
	  *@return AdminRole
	  *@create_time 2020/2/25 10:00
	  *@author huangzt
	  */
	AdminRole queryByPk(@Param(value = "id") String id);
	/**
	  * (方法简介)
	  * ->
	  *@param record
	  *@return int
	  *@create_time 2020/2/25 10:00
	  *@author huangzt
	  */
	int update(AdminRole record);
	/**
	  * (方法简介)
	  * ->
	  *@param roleid
	 * @param groupid
	  *@return int
	  *@create_time 2020/2/25 10:00
	  *@author huangzt
	  */
	int insertRoleGroup(@Param(value = "role_id") long roleid, @Param(value = "group_id") long groupid);
	/**
	  * (方法简介)
	  * ->
	  *@param roleid
	 * @param groupid
	  *@return int
	  *@create_time 2020/2/25 10:00
	  *@author huangzt
	  */
	int deleteRoleGroup(@Param(value = "role_id")long roleid,@Param(value = "group_id") long groupid);

	/**
	  * (方法简介)
	  *@param groupid
	  *@return List<Map<String,Object>>
	  *@create_time 2020/2/25 10:29
	  *@author huangzt
	  */
	List<Map<String,Object>> queryRoleByGroup (@Param(value = "group_id") long groupid);
}

 